package Base;

import java.awt.Point;

/**
 *  This class allows the adding of movement objects to a SceneElement. Each SceneElement has its vector
 *  with AnimationState objects, in which the position and the time is stored.
 *  @author Wayang Group Bremen
 * 	@version 0.9
 */

public class AnimationState {

	public long lastTimeTimerStarted;
	public long creationTime;
	public Point coord_holder = new Point();
	public String text = null;
	public boolean sound2;
	public boolean flipped;
	public boolean rotationL;
	public boolean rotationR;
	
	/**
	 * This constructor creates an AnimationState object.
	 * @param p	the point of the object
	 * @param lastTime last time that the timer was started
	 * @param creationTime actual time
	 * @param flipped is the SceneElement in a flipped state	
	 * @param rotationL is the SceneElement in a rotationL state
	 * @param rotationR is the SceneElement in a rotationR state
	 * @param sound is the SceneElement in a sound state
	 */

	public AnimationState(Point p, long lastTime, long creationTime, boolean flipped, boolean rotationL, boolean rotationR, boolean sound) {

		this.coord_holder.x = p.x;
		this.coord_holder.y = p.y;
		this.lastTimeTimerStarted = lastTime;
		this.creationTime = creationTime;
		this.flipped = flipped;
		this.rotationL = rotationL;
		this.rotationR = rotationR;
		this.sound2 = sound;
		
		
    }
	
	/**
	 * This constructor creates an AnimationState object we use it, when we parse .xml files.
	 * @param p	the point of the object
	 * @param lastTime last time that the timer was started
	 * @param creationTime actual time
	 * @param flipped is the SceneElement in a flipped state	
	 * @param rotationL is the SceneElement in a rotationL state
	 * @param rotationR is the SceneElement in a rotationR state
	 * @param sound is the SceneElement in a sound state
	 * @param text the text of the SceneElement
	 */
	public AnimationState(Point p, long lastTime, long creationTime, boolean flipped, boolean rotationL, boolean rotationR, boolean sound, String text) {

		this.coord_holder.x = p.x;
		this.coord_holder.y = p.y;
		this.lastTimeTimerStarted = lastTime;
		this.creationTime = creationTime;
		this.flipped = flipped;
		this.rotationL = rotationL;
		this.rotationR = rotationR;
		this.sound2 = sound;
		this.text = text;
		
    }
	/**
	 * This constructor creates a limited AnimationState object.
	 * @param p the point of the SceneElement
	 * @param lastTime lastTime last time that the timer was started
	 * @param creationTime actual time
	 * @param text the text of the SceneElement
	 * @param flipped is the SceneElement in a flipped state?
	 */
	public AnimationState(Point p, long lastTime, long creationTime, String text, boolean flipped) {

		this.coord_holder.x = p.x;
		this.coord_holder.y = p.y;
		this.lastTimeTimerStarted = lastTime;
		this.creationTime = creationTime;
		this.text = text;
		this.flipped = flipped;
		
	}
}


